<extend name="Public:index" />
<block name="main-crumb">
 <li class="active">部门列表</li>
</block>
<block name="main-content">

   <form  class="form-inline definewidth m20" action="{:U('department_lists')}" method="post">
   <div class="definewidth">
    <a class="btn btn-primary pull-right" href="{:U('department_add')}"><i class="ace-icon fa fa-plus"></i> 添加部门</a>
    <div class="form-group">
	  <label for="name">部门名称：</label>
      <input type="text" class="form-control" id="name" name="name" placeholder="部门名称..." value="{$Think.request.name}">
    </div><!-- /form-group -->
	<button class="btn btn-primary" id="searth" type="submit">搜索</button>
  </div>
   <table class="table table-bordered table-hover definewidth m10">
       <tr>
            <th>编号</th>
            <th>部门名称</th>
            <th>上级部门</th>
            <th>是否显示</th>
            <th>操作</th>
        </tr>
        <volist name="list" id="mlist">
        <tr>

            <td>{$mlist[id]}</td>
            <td>{$mlist[name]}</td>
            <td>{$mlist[pname]}</td>
            <td> <if condition="$mlist[is_show] eq 1">
                                显示
                <else/>
                                不显示
                </if>
            </td>
            <td>  <a href="{:U('department_edit',array('id'=>$mlist[id]))}">编辑</a>&nbsp;&nbsp;

                 |&nbsp;&nbsp;<a href="javascript:if(confirm('确认删除？'))location='{:U('department_deletes',array('id'=>$mlist[id]))}'">删除</a>

            </td>
        </tr>
        </volist>
    </table>
	<div class="definewidth">{$page}</div>
   </form>
</block>